--ÿλͬѧ��ƽ���ɼ�
use TEST04
select * from Student
go
create function func_Getsvg(@name varchar(20))
returns decimal(5,2)
as
begin
	declare @avg decimal(5,2) = (select avg(score) from SC where [SId] = (select [SId] from Student where Sname = @name) )
	return @avg
end
go
select dbo.func_Getsvg('����')
drop function func_Getsvg
